package com.ecut.property_project.controller.indexData;

import com.ecut.property_project.service.room.RoomHeadService;
import com.ecut.property_project.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/roomtotal")
public class RoomTotalController {

    @Autowired
    private RoomHeadService service;

    @GetMapping
    public Result getTotal(){
        int total = service.getRoomCount();
        return Result.succ(total);

    }



}
